import torch

x= torch.randn(3,4, requires_grad=True)
b = torch.ones(3,4)*520
b.requires_grad_(True)
# t = x+b
t = x*b
y=t.sum()
y.backward()
# y.backward()中的y对x的梯度
print(x.grad)